#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
    int new_habbit = 0;
    int one_habbit = 0;
    int old_habbit = 1;

    int month = 0;
    scanf("%d", &month);

    if (month < 3)
    {
        printf("%d", 1);
        return 1;
    }

    int k = 3;
    while (k <= month)
    {
        old_habbit += one_habbit;
        one_habbit = new_habbit;
        new_habbit = old_habbit;
        k++;
    }

    printf("%d", new_habbit + one_habbit + old_habbit);
    return 0;
}

#include <stdio.h>
#include <math.h>

int main() {

    int k = 0;
    double num = 0;
    double sum = 0;

    while (~scanf("%lf %d", &num, &k))
    {
        for (int i = 0; i < k; i++)
        {
            sum += num;
            num = sqrt(num);
        }

        printf("%.2lf\n", sum);
        sum = 0;
    }

    return 0;
}